/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package barbershop;

/**
 *
 * @author Гамзатов
 */
public class Cashier extends Thread {
	@Override
	public void run() {
		while (variables.alldone < variables.customerall) {
			try {
			variables.payment.acquire();
			variables.coord.acquire();
			System.out.println("The cashier is accept pay");
			variables.coord.release();
			variables.receipt.release();
			variables.maxCapacity.release();
		} catch (InterruptedException e) {
		}
                }
	}
}